package com.iter.devbox.pattern;

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws FileNotFoundException {
		Ijuice juice = new Juice();
		System.out.println("纯水的价格：" + juice.cost());
		
		Ijuice appleJuice = new AppleJuice(new Juice());
		System.out.println("苹果汁的价格：" + appleJuice.cost());
		
		Ijuice orangeJuice = new OrangeJuice(new Juice());
		System.out.println("桔子汁的价格：" + orangeJuice.cost());
		
		Ijuice appleOrangeJuice = new OrangeJuice(new AppleJuice(new Juice()));
		System.out.println("苹果汁桔子汁的价格：" + appleOrangeJuice.cost());
		
		BufferedReader br = new BufferedReader(new InputStreamReader(new BufferedInputStream(new FileInputStream(new File("c:/a.txt")))));
	}
}
